subroutine outputTec
use var
implicit none

    character(len=23)string
    integer i,j
    
    
        write(string,'(a3,i4,a1,i4,a1,i6.6,a4)')'tec',c_init_case,'-',c_case,'-',Tstep,'.plt'
        open(unit=100,file=trim(adjustl(string)),status='replace')  
        !write(100,*)'TITLE=2d'
        write(100,*) 'variables=x,y,d,u,v,p,q1,q2,q3,q4' 
        !write(100,*) 'variables=x,d,u,v,p,q1,q2,q3,q4' 
        write(100,*) 'zone I=',gridsx,'J=',gridsy,'F=Point'
        !write(100,*) 'zone I=',gridsx,'F=Point'
        !write(100,*) 'solutionTime=',tt
        do j=1,gridsy
            do i=1,gridsx
                write(100,'(10(e20.10))') xc(i,j),yc(i,j),d(i,j),u(i,j),v(i,j),p(i,j),Qmean(i,j,1:4)
                !write(100,'(10(e20.10))') xc(i,j),d(i,j),u(i,j),v(i,j),p(i,j),q(i,j,1:4)
            enddo            
        end do
        close(100)
    
    

end subroutine 